package com.headingdata.define;

import java.util.Scanner;

public class ArrayDemo3 {
    public static void main(String[] args) {
        //评委打分  六个评委的平均分
        double average = 0;
        Scanner scan = new Scanner(System.in);
        double[] scores = new double[6];
        double sum = 0;
        for(int i = 0;i < scores.length;i++){
            System.out.println("请输入第" + (i+1) + "位评委评分：");
            scores[i] = scan.nextDouble();
            sum += scores[i];
        }
        average = sum / scores.length;
        System.out.println(average);
        System.out.println(scores);
    }

}
